﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain;

namespace S4Store.Models.Car
{
    public class CarModelListPage : ListPageModel<CarModel>
    {
        public bool AllowChangeStatus { get; set; }
        public List<CarBrand> Brands { get; set; }
        public List<PinPai> PinPai
        {
            get
            {
                if (Brands == null) return new List<PinPai>();
                return (from brand in Brands group brand by brand.PinPai into g select g.Key).ToList();
            }
        }

    }
}